<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>添加Ebay账单</title>
<script language="javascript">
	function checkDecimal(obj) {
		//var decimalReg=/^\d{0,9}\)?$/; //只能输入数字
		var decimalReg = /^\d+(?=\.{0,1}\d+$|$)/; //可以输入数字或小数点
		if(obj.value!=""&&decimalReg.test(obj.value)){
		}else {
			if (obj.value != "") {
				//alert('非法值！请重新输入！');return ;
				obj.value = 0
			}
		}
	}
</script>
<body class="withvernav">
<div class="bodywrapper"> {{include file='/public/leftmenu.tpl'}}
	<div class="centercontent">
		<div class="pageheader notab">
			<h1 class="pagetitle">添加Ebay账单</h1>
			<span class="pagedesc"></span>
			<div class="menulist">
				<ul class="profile_summary">
					<li class="current"><a href="/EbayMessage/getEbayBillList">Ebay账单列表</a></li>
				</ul>
			</div>
		</div>
		<!--pageheader-->

		<div id="contentwrapper" class="contentwrapper">
			<div id="basicform" class="subcontent">
				<form class="stdform stdform2"  id="otherForm" method="post" action="/EbayMessage/addEbayBill" enctype="multipart/form-data" >
					<table cellpadding="0" cellspacing="0" border="0" class="stdtable">
						<thead>
						<tr>
							<th colspan="2" class="head1">一、基础信息</th>
						</tr>
						</thead>
					</table>
					<table cellpadding="0" cellspacing="0" border="0" class="stdtable">
						<tbody>
						<tr>
							<td class="head1" width="120">店铺名</td>
							<td class="head0" colspan="3">
								<select name="shopid" id="shopid" class="selection select2_group" style="width:200px;" required>
									<option value="">请选择</option>
									{{foreach from=$shoplist item=li key=key}}
									<option value="{{$li.id}}" {{if $detail.shopId eq $li.id}}selected{{/if}}>{{$li.name}}</option>
									{{/foreach}}
								</select>
								&nbsp;&nbsp;<span style="color:red;">*必选项</span>
							</td>
						</tr>
						<tr>
							<td class="head1" width="120">时间段</td>
							<td colspan="3" class="head0">
								从&nbsp;<input type="text" name="startdate" id="startdate" class="width200" value="{{$detail.startDate}}" required onClick="WdatePicker({dateFmt:'yyyy-MM-dd '})" class="width100 hasDatepicker">&nbsp;
								至&nbsp;&nbsp;<input type="text" name="enddate" id="enddate" class="width200" value="{{$detail.endDate}}" required onClick="WdatePicker({dateFmt:'yyyy-MM-dd '})" class="width100 hasDatepicker">&nbsp;&nbsp;<span style="color:red;">*必填项</span>
							</td>
						</tr>
						<tr>
							<td class="head1" width="120">店铺费用</td>
							<td colspan="3" class="head0">
								<input type="text" name="fee" id = "fee" class="width200" value="{{$detail.insertionFee}}" onblur='checkDecimal(this)' required>&nbsp;美元&nbsp;
							</td>
						</tr>
						<!--<tr>
							<td class="head1" width="120">租金</td>
							<td colspan="3" class="head0">
								<input type="text" name="shopfee" id = "shopfee" class="width200" value="{{$detail.shopFee}}" onblur='checkDecimal(this)'>&nbsp;美元&nbsp;
							</td>
						</tr>-->

						<tr>
							<td class="head1">excel账单明细(html版)</td>
							<td class="head0" colspan="3">
								<input  type="file" name="file_excel" />
								&nbsp;
								{{if $detail.excelUrl}}
									<a href="{{$detail.excelUrl}}" target="_blank">当前链接</a>
									<br/><br/>
									<span style="color:red;">备注：若重新上传excel文件,则会删除之前上传的excel文件</span>
								{{/if}}
							</td>
						</tr>
						</tbody>
					</table>
					<table cellpadding="0" cellspacing="0" border="0" class="stdtable">
						<thead>
						<tr>
							<td colspan="3" id="showbuttom">
								<input type="hidden" value="{{$detail.id}}" name="ebayId">
								<button type="submit"  type="submit"  class="btn btn-primary" > 保存
								</button>
							</td>
						</tr>
						</thead>

					</table>
				</form>
			</div>
			<!--subcontent-->

			<!--subcontent-->

		</div>
		<!--contentwrapper-->

	</div>
	<!-- centercontent -->

</div>
<!--bodywrapper-->
</body>
</html>